<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>防火墙添加</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">

		function checkValidate()
		{

			var firewallName=document.getElementById("firewallName").value;
			var firewallPolicyName=document.getElementById("firewallPolicyName").value;

			//判断是否为空
			if(firewallName==null||firewallName=="")
			{
				window.alertx("请输入防火墙名称！");
				return false;
			}
			if(firewallPolicyName==null||firewallPolicyName=="")
			{
				window.alertx("请输入防火墙策略名称！");
				return false;
			}
		}
	</script>
</head>
<body>
<ul class="nav nav-tabs">
	<%--<li><a href="${ctx}/scene/sceneRouter/firewallList?routerId=${routerId}&environmentId=${environmentId}">防火墙</a></li>--%>
	<li class="active"><a href="${ctx}/scene/sceneRouter/firewallForm?routerId=${routerId}&environmentId=${environmentId}">防火墙添加</a></li>
</ul><br/>
<form id="inputForm" modelAttribute="SceneFirewall" action="${ctx}/scene/sceneRouter/firewallSave" method="post" class="form-horizontal">
	<input type="hidden" id="routerId" name="routerId" value="${routerId}"/>
	<input type="hidden" id="environmentId" name="environmentId" value="${environmentId}"/>
	<div class="control-group">
		<label class="control-label">防火墙名称：</label>
		<div class="controls">
			<input type="text" id="firewallName" name="firewallName" maxlength="64" class="input-xlarge required"/>
			<span class="help-inline"><font color="red">*</font> </span>
		</div>
	</div>
	<div class="control-group">
		<label class="control-label">防火墙策略名称：</label>
		<div class="controls">
			<input type="text" id="firewallPolicyName" name="firewallPolicyName" maxlength="64" class="input-xlarge required"/>
			<span class="help-inline"><font color="red">*</font> </span>
		</div>
	</div>

	<div class="form-actions">
		<shiro:hasPermission name="scene:sceneRouter:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="下一步" onclick=" return checkValidate()"/>&nbsp;</shiro:hasPermission>
		<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
	</div>
</form>
</body>
</html>